/**
 * 
 */
package edu.umd.clip.lm.model;

import edu.umd.clip.lm.factors.FactorTuple;
import edu.umd.clip.lm.util.BinaryPrefix;

/**
 * @author Denis Filimonov <den@cs.umd.edu>
 *
 */
public class GhostProbTree implements AbstractProbTree, Cloneable {
	private double totalProb;
	
	
	public GhostProbTree(AbstractProbTree tree) {
		this.totalProb = tree.getTotalProb();
	}

	public GhostProbTree(double totalProb) {
		this.totalProb = totalProb;
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#cut(edu.umd.clip.lm.util.BinaryPrefix)
	 */
	public ProbTree cut(BinaryPrefix cuttingPrefix) {
		throw new UnsupportedOperationException();
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#getPrefix()
	 */
	public BinaryPrefix getPrefix() {
		throw new UnsupportedOperationException();
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#getProbTree()
	 */
	public ProbTree getProbTree() {
		throw new UnsupportedOperationException();
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#getTotalProb()
	 */
	public double getTotalProb() {
		return totalProb;
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#getTuple()
	 */
	public long getTuple() {
		throw new UnsupportedOperationException();
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#getWordPrefix()
	 */
	public BinaryPrefix getWordPrefix() {
		throw new UnsupportedOperationException();
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#testCut(edu.umd.clip.lm.util.BinaryPrefix)
	 */
	public Boolean testCut(BinaryPrefix cuttingPrefix) {
		throw new UnsupportedOperationException();
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#testOvertFactors(edu.umd.clip.lm.factors.Factors)
	 */
	public Boolean testOvertFactors(long factors) {
		throw new UnsupportedOperationException();
	}

	@Override
	public Object clone() {
		return new GhostProbTree(totalProb);
	}

	/* (non-Javadoc)
	 * @see edu.umd.clip.lm.model.AbstractProbTree#scale(double)
	 */
	public void scale(double scale) {
		totalProb *= scale;
	}

}
